#ifndef LEARNINGENGLISH2_H
#define LEARNINGENGLISH2_H

#include <QtGui/QWidget>
#include "ui_learningenglish2.h"
#include <vector>
#include <map>
#include <string>

class learningEnglish2 : public QWidget
{
    Q_OBJECT

public:
    learningEnglish2(QWidget *parent = 0);
    ~learningEnglish2();

private:
	QString word_;
	std::vector<std::string> words;
	std::map<std::string, std::vector<std::string> > dict;
	std::map<std::string, std::string> dict1;
	std::map<int, int> errors;
	double p;
    Ui::learningEnglish2Class ui;
    void load();
    void save();
	std::string getTrans(int w);
	void turn();
	QString changeLayout(const QString s);
	int w_;
 private slots:
	void pushButton_clicked();
	void lineEditWord_returnPressed();
	void lineEditTranslate_textChanged(QString);
	 
};

#endif // LEARNINGENGLISH2_H
